package xjtu.zd.server.staff.login.impl;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import xjtu.zd.server.staff.login.SLoginDto;
import xjtu.zd.server.staff.login.SLoginService;
import xjtu.zd.server.staff.login.dao.SLoginDao;

import javax.annotation.Resource;

@Service
@Transactional
public class SLoginServiceImpl implements SLoginService {

    @Resource
    private SLoginDao SLoginDao;

    @Override
    public boolean checkLogin(SLoginDto dto) {
        int cnt = SLoginDao.findStaffByIdAndPwd(dto);
        return cnt > 0;
    }

}
